package com.jacksen.demo.view.searchview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.jacksen.demo.view.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class TestSearchView extends AppCompatActivity {

    @Bind(R.id.toolbar)
    Toolbar toolbar;

    @Bind(R.id.btn)
    Button btn;
    private MenuItem searchItem;

    private SearchView searchView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_test_search_view);
        ButterKnife.bind(this);

        setSupportActionBar(toolbar);

//        toolbar.inflateMenu(R.menu.menu_toolbar);

       /* searchView = (SearchView) findViewById(R.id.action_item_search);
        searchView.setIconifiedByDefault(false);*/
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                searchItem.expandActionView();
//                searchItem.getActionView().performClick();
            }
        });


    }


}
